home *** CD-ROM | disk | FTP | other *** search
- Path: engnews2.Eng.Sun.COM!usenet
- From: nitin@more.eng.sun.com (Nitin More [CONTRACTOR])
- Newsgroups: comp.lang.c++
- Subject: Virtual functions in derived classes
- Date: 10 Jan 1996 01:06:06 GMT
- Organization: SunSoft
- Message-ID: <NITIN.96Jan9170606@more.eng.sun.com>
- References: <30ECA10F.3D99@ifu.net> <NITIN.96Jan5125830@more.eng.sun.com>
- <4crquj$7t1@lib108.its.rpi.edu> <NITIN.96Jan9103242@more.eng.sun.com>
- <ALUN.CHAMPION.96Jan9152102@g7240065.bridge.bst.bls.com>
- NNTP-Posting-Host: more.eng.sun.com
- In-reply-to: Alun.Champion@bridge.bst.bls.com's message of 09 Jan 1996 20:21:02 GMT
-
-
-
- Alan,
-
- Thanks for clarifying that ...
-
- > 2 If a virtual member function vf is declared in a class Base and in a class
- > Derived, derived directly or indirectly from Base, a member function vf with
- > the same name and same parameter list as Base::vf is declared, then
- > Derived::vf is also virtual (whether or not it is so declared) and it
- > overrides Base::vf. ...
- > ...
-
-
- This is Yuck! since sometimes you might not want the user of your class
- library to overwrite your methods but want to use the virtual methods in
- implementing the class library.
-
- -Nitin
- --
- ----------------------------------------------------------------------
- Nitin More
- SunSoft, Bldg 16 Off: (415) 786 7109
- Menlo Park, CA Fax: (415) 786 7957 e-mail: nitin@more.eng.sun.com
- ----------------------------------------------------------------------
-